import request from '@/utils/request'
import qs from 'qs'
export function roleList(data) {

  return request({
    url: '/api/role/roleList',
    method: 'post',
    data:data
  })

}


export function  sumbitRole(data){

   return request({
     url: '/api/role/save',
     method: 'post',
     data:data
  })
}

export function authResources(data){
  return request({
    url: '/api/role/auth_resource',
    method: 'post',
    data:qs.stringify(data),
    headers:{"Content-Type":"application/x-www-form-urlencoded"}
  })
}

export function getUserRoleSelection(data){
  alert(qs.stringify(data))
  return request({
    url: '/api/role/role_select',
    method: 'post',
    data:qs.stringify(data),
    headers:{"Content-Type":"application/x-www-form-urlencoded"}
  })

}
